package util;
/**
 * 韩梦飞沙 韩亚飞 313134555@qq.com yue31313 han_meng_fei_sha
 * on 2017/10/18.
 */

public class NoDoubleClickUtils
{
    private static long lastClickTime;
    private final static int SPACE_TIME = 1500;

    public static void initLastClickTime() {
        lastClickTime = 0;
    }

    public synchronized static boolean isDoubleClick() {
        long currentTime = System.currentTimeMillis();
        boolean isClick2;
        isClick2 = currentTime - lastClickTime <= SPACE_TIME;
        lastClickTime = currentTime;
        return isClick2;
    }
//     if (!NoDoubleClickUtils.isDoubleClick()) {
//    LogUtils.i("notDoubleClick()");
//} else {
//    LogUtils.i("isDoubleClick()");
//    return;
//}
}
